class Queue(object):
   
    def __init__(self,start=[]):
        self.queue = []
        for x in start: 
            self.enqueue(x)
        
    def dequeue(self):
         self.queue.reverse()
         temp = self.queue.pop()
         self.queue.reverse()
         return temp

    def enqueue(self,object):
        return self.queue.append(object)

    
    def length(self):
        return len(self.queue)
    
    def first(self):
        self.queue.reverse()
        temp = self.queue.pop()
        self.queue.append(temp)
        self.queue.reverse()
        return temp

a= Queue([1,2,3])
print a.first()
print a.dequeue()